package xyz.jiang.asteroid.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import xyz.jiang.asteroid.common.base.RestResponse;
import xyz.jiang.asteroid.mapper.UserMapper;
import xyz.jiang.asteroid.pojo.dto.UserDTO;
import xyz.jiang.asteroid.pojo.entity.User;
import xyz.jiang.asteroid.service.UserService;
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectOne(String username) {
        UserDTO userDTO = new UserDTO();
        userDTO.setUsername(username);
       return userMapper.selectUserForLogin(userDTO);
    }
}
